import { request } from './request'

export function getHomeBanner() {
  return request({
    url: '/banner'
  })
}

// 首页数据
export function getHomePage() {
  return request({
    url: '/homepage/block/page'
  })
}
export function getHomeRecommend() {
  return request({
    url: '/recommend/songs'
  })
}

export function  getHomeNewSong(type) {
  return request({
    url: '/top/song',
    params: {
      type: type
    }
  })
}


export class relatedPlayList {
  constructor(related) {
    this.imageUrl = related.resources[0].uiElement.image.imageUrl
    this.title = related.resources[0].uiElement.mainTitle.title
    this.playCount = related.resources[0].resourceExtInfo.playCount
    this.id = related.creativeId
  }
}